# encoding: utf-8

"""
    python中的while循环支持else
    其他语法与if一样，就不写笔记了
"""

# 案例1：while与else的结合
count = 0
while count < 5:
    print(count,"小于5")
    count += 1  # python不支持++ --这种语法
else:
    print(count,"不小于5了")

# 案例2：求1-100的偶数和
now = 0
addSum = 0
while now <= 100:
    addSum += now
    now += 2
print(addSum)